<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<div id="Content">
    <div id="Catalog">

        <div align="middle">
            <h1>Orders Manage</h1>

            <p align="center" th:if="${orderList==null}"><font size="8" color="red">您暂时还没有订单信息哦，赶快去商城购物吧！！</font></p>
            <table th:if="${orderList!=null}">
                <tr>
                    <th>Order ID</th>
                    <th>Date</th>
                    <th>Total Price</th>
                    <th>option</th>
                </tr>
                <!--                <c:forEach var="order" items="${sessionScope.orderList}">-->
                <tr th:each="order:${orderList}">
                    <td>
                        <!--                            <a href="checkOrder?orderId=${order.orderId}">${order.orderId}</a>-->
                        <a th:href="@{'/AccountManage/checkOrder?orderId='+ ${order.orderId}}" th:text="${order.orderId}" ></a>
                    </td>
                    <td th:text="${#dates.format(order.orderDate,'yyyy/MM/dd')}">
                        <!--                            <fmt:formatDate value="${order.orderDate}" pattern="yyyy/MM/dd hh:mm:ss"/>-->
                    </td>
                    <td th:text="'$'+ ${#numbers.formatDecimal(order.totalPrice,3,3,'COMMA')}">
                        <!--                            <fmt:formatNumber value="${order.totalPrice}" pattern="$#,##0.00"/>-->
                    </td>
                    <td>
                        <a th:href="@{'/AccountManage/deleteOrder?orderId='+ ${order.orderId}}">删除</a>/<a th:href="@{'/AccountManage/checkOrder?orderId='+ ${order.orderId}}">查看</a>
                    </td>
                </tr>
                <!--                </c:forEach>-->
            </table>
        </div>
    </div>
</div>
</body>
</html>